//
//  ActivityTableViewController.m
//  JZ100
//
//  Created by lj on 15/9/2.
//  Copyright © 2015年 itcast. All rights reserved.
//

#import "ActivityViewController.h"

@interface ActivityViewController ()

@end

@implementation ActivityViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    
    [self setNavigationBar];
   
    [self.view setBackgroundColor:[UIColor whiteColor]];
    
}

/// 设置导航条
-(void)setNavigationBar
{
    
    self.navigationItem.titleView = [[UIImageView alloc]initWithImage:[UIImage imageNamed:@"logo_activity"]];
    [self.navigationController.navigationBar setTintColor:[UIColor blackColor]];
    //leftItem
//    UIBarButtonItem* leftItem = [[UIBarButtonItem alloc]initWithTitle:@"cityName" style:UIBarButtonItemStylePlain target:nil action:nil];
    UIButton* leftBtn = [UIButton buttonWithType:UIButtonTypeCustom];
    [leftBtn setTitle:@"cityName" forState:UIControlStateNormal];
    [leftBtn setTitleColor:[UIColor blackColor] forState:UIControlStateNormal];
    [leftBtn setImage:[UIImage imageNamed:@"disclosure_down"] forState:UIControlStateNormal];
    [leftBtn sizeToFit];
    self.navigationItem.leftBarButtonItem = [[UIBarButtonItem alloc]initWithCustomView:leftBtn];
    
    //右边的Item
    UIBarButtonItem* rigthItem = [[UIBarButtonItem alloc]initWithImage:[UIImage imageNamed:@"search"] style:UIBarButtonItemStylePlain target:nil action:nil];
    self.navigationItem.rightBarButtonItem = rigthItem;
}

@end
